import request from '#/utils/requestAbort';
import { exportRequest } from '#/utils/request';
export const apiPre = `/disclosure/settlement`;

// 获取数据
export const fetchData = async (data) => {
  return request(`${apiPre}/fetchData?beginDate=${data.beginDate}&endDate=${data.endDate}`);
};

// 导出数据
export const exportData = async (data) => {
  return exportRequest(`/market-disclosure/settlement/exportData`, { data }, { isDownload: true });
};

// 月数据导出
export const exportMonthData = async (data) => {
  return exportRequest(
    `/market-disclosure/settlementdatadisplayMonth/exportData`,
    { data },
    { isDownload: true },
  );
};

// 获取交易中心
export const getMarketList = async (data) => {
  return request(`/market-disclosure/settlementdatadisplayMonth/getPearsonValueByDictionary`, {
    method: 'GET',
  });
};
